const http = uni.$u.http

// post请求 ，微信登录
export const login = (param ={}) => http.post('/login/authLogin', param)

// 获取用户信息
export const getWxInfo = (param) => http.get('/user/userinfo')

//获取用户绑定的设备
export const searchEq = (param = {pageSize:100,currentPage:1}) => http.post('/equipment/searchEq',param)

//通过设备外观id 和传感器id 查询出对应的设备
export const searchEqByQuery = (param = {}) => http.post('/equipment/searchEqByQuery',param)


//绑定设备
export const bindAd = (param = {}) => http.post('/equipment/bindAd',param)


//查询设备数据
export const searchData = (param = {}) => http.post('/testData/searchData',param)


//修改设备名称
export const updateAd = (param = {}) => http.post('/equipment/updateAd',param)

//删除设备
export const removeBinding = (param) => http.get('/equipment/removeBinding/'+param)

//获取手机号码
export const getPhoneNumber = (param = {}) => http.post('/login/getPhoneNumber',param)


//修改用户信息
export const updateUserInfo = (param = {}) => http.post('/user/updateUserInfo',param)


//修改用户信息
export const searchDayAvgData = (param = {}) => http.post('/testData/searchDayAvgData',param)



